<?php
/**
 * Created by PhpStorm.
 * User: MIS
 * Date: 2018/10/22
 * Time: 15:32
 */
namespace Admin\Controller;
use Think\Controller;
class UpdataController extends Controller
{
    public function index(){
        $id=I("id");
        $_SESSION["id"]=$id;
        $username=I("username");
        $_SESSION["username"]=$username;
        $this->display();
    }

    public function  select(){
        $this->uptime($_SESSION["id"]);
        redirect(U('/Admin/Select/index',array('id'=>$_SESSION["id"],'username'=>$_SESSION["username"])));
    }

    public function  judge(){
        redirect(U('/Admin/Judge/index',array('id'=>$_SESSION["id"],'username'=>$_SESSION["username"])));
    }

    public function  blank(){
        redirect(U('/Admin/Blank/index',array('id'=>$_SESSION["id"],'username'=>$_SESSION["username"])));
    }

    public function  quit(){
        redirect(U('/Admin/Index/index'));
    }

    public function uptime($id){
        $text = M('test');
        $data=array(
            "uptime"=>time(),
        );
        $text->where('`id`='.$id)->setField($data);
    }

}
